import java.util.*;

public class C {
	public static void main(String[] args) {
		var sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		s = s.toUpperCase() + "X";
		int j = 0;
		for(int i = 0; i < s.length(); i ++ ) {
			if(s.charAt(i) == t.charAt(j)) {
				j ++ ;
				if(j == 3) {
					System.out.print("Yes");
					return ;
				}
			}
		}
		System.out.print("No");
	}
}
